<?php
session_start();
error_reporting(E_ALL);

//Includes
include 'php/functies.php';
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Mark Post - Admin</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link rel="stylesheet" href="css/jquery.fancybox.css?v=2.1.3" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery.min.js" ></script>
<script type="text/javascript" src="js/menu.js"></script>
</head>

<body>

<header>
		<h1><a href="http://www.mark-post.nl/admin" title="Mark Post - Admin | Home">Mark Post - Admin</a></h1>
</header>

<div id="container">
	<div id="sidebar">
   
      <nav>
         <div class="button">Navigatie
            <div id="navigationmenu">
               <ul id="menu">
                  <li><a href="#home">Home</a></li>
                  <li><a href="#redirect">Redirect</a></li>
               </ul>
               <span class="clear"></span>
            </div>
         </div>
      </nav>
   </div>

   <div class="contpaper">
   	<div class="paper"></div>
      <div id="content">      
			<section class="maincontent" id="sechome">
 				<h2>Home</h2>
				<p>Dit is de admin panel.</p>
			</section>
     	</div>
   </div>
</div>

<footer>&copy; 2012 Mark Post - markpost[at]mark-post.nl | <a href="#home">Home</a> - <a href="#redirect">Redirect</a></footer>

<script type="text/javascript" src="js/ga.js"></script>
<script type="text/javascript" src="js/jquery.fancybox.pack.js?v=2.1.3"></script>
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js/jquery.noty.js"></script>
<script type="text/javascript" src="js/layouts/center.js"></script>
<script type="text/javascript" src="js/themes/default.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $('.button').hover(
    function() { $('#navigationmenu').fadeIn(600); },
    function() { $('#navigationmenu').fadeOut(600); }
  );
});

$(function() {
	$('.load_more').live("click",function() {
		var ID = $(this).attr("id");
		if(ID){
			$("#load"+ID).html('<br>Loading...');

			$.ajax({
				type: "POST",
				url: "php/more_getrecent.php",
				data: "max_id="+ ID, 
				cache: false,
				success: function(html){
					$("#photos").append(html);
					// remove the previous load more link
					$("#load"+ID).remove();
				}
			});
		}else{
			// End or articles (no more)
			$(".load_more").html('');
		}

		return false;
	});
});

$(document).ready(function() {
	$(".fancybox").fancybox();
});
  
function generate(text, type) {
	var n = noty({
  		text: text,
  		type: type,
      dismissQueue: true,
  		layout: 'center',
  		theme: 'defaultTheme'
  	});
	console.log('html: '+n.options.id);
}
</script>
</body>
</html>
<?php
if($_SERVER['REQUEST_METHOD'] == "POST"){
	if(isset($_POST)){
		if(sendemail()){
			?>
<script type="text/javascript">
	$(document).ready(function() {
		generate('<?php echo lang('sendsuccess'); ?>', 'success');
	});
</script>
      	<?php
		}else{
			?>
<script type="text/javascript">
	$(document).ready(function() {
		generate('<?php echo lang('senderror'); ?>', 'warning');
	});
</script>
      	<?php
		}//if
	}//if
}//if

session_destroy();
?>